#!/bin/sh
# Milis Linux Hızlı Zig Derleyici Kurucu 2022
[ -z $1 ] && exit 1

version=$1
mkdir -p $HOME/{.cache,.local}
cd $HOME/.cache
wget https://ziglang.org/download/${version}/zig-linux-x86_64-${version}.tar.xz
rm -rf ../.local/zig && tar -C ../.local -xzf zig-linux-x86_64-${version}.tar.xz
cd ../.local
mv zig-linux-x86_64-${version} zig

export PATH=$PATH:$HOME/.local/zig/bin
